from django.db import models

# Create your models here.


class Loginuser(models.Model):
    """用户表"""
    class Meta:
        db_table = 'loginuser'

    CATE_CHOICES = (
        (0, '普通用户'),
        (1, '商家'),
    )
    name = models.CharField(verbose_name="用户名", max_length=50)
    password = models.CharField(verbose_name="密码", max_length=128)
    cate = models.IntegerField(verbose_name="用户类别", default=0, choices=CATE_CHOICES)
    # headshot = models.CharField(verbose_name="头像", max_length=256, null=True, blank=True)
    headshot = models.TextField(verbose_name="头像", null=True, blank=True)  # 以bs64存储头像




